package ro.jproject.imc;

import java.beans.XMLDecoder;
import java.beans.XMLEncoder;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

 
public class ReadXmlInfo {
	
		//	new BufferedInputStream(
	XMLDecoder decode;
	FileInputStream in;
	
	public void readFromXml() throws FileNotFoundException{
		
		in = new FileInputStream("D:/persons.xml");
		decode = new XMLDecoder(in);
		
		Object result = decode.readObject();
		System.out.println(result);
		decode.close();
	
	}
}/*
public void saveToXmlPerson(String saveFirstName, String saveLastName) {
		
	Person person = new Person();
	person.setFirstName(saveFirstName);
	person.setLastName(saveLastName);
	encoder.writeObject(person);
	encoder.close();
}
*/